﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace HSMPWeb
{
    public partial class HsmpHomePage : System.Web.UI.Page
    {
        #region  Variable& constant
        #endregion  Variable& constant

        #region Constructor & Destructor
        #endregion Constructor & Destructor

        #region Properties
        #endregion Properties

        #region Public Methods
        #endregion Public Methods

        #region Events
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                setImageUrl();
            }
        }

        protected void Timer1_Tick(object sender, EventArgs e)
        {
            setImageUrl();
        }
        #endregion Events

        #region Private Methods
        private void setImageUrl()
        {
            Random _rand = new Random();
            int i = _rand.Next(11, 17);
            Image1.ImageUrl = "../Images/HomepageSlideImages/" + i.ToString() + ".jpg";
        }
        #endregion Private Methods
        
        
    }
}